# encoding: utf-8

#*******************************************************************************
#                                                                              *
#   ReadOnMac is free software: you can redistribute it and/or modify          *
#   it under the terms of the GNU General Public License as published by       *
#   the Free Software Foundation, either version 3 of the License, or          *
#   (at your option) any later version.                                        *
#                                                                              *
#   ReadOnMac is distributed in the hope that it will be useful,               *
#   but WITHOUT ANY WARRANTY; without even the implied warranty of             *
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
#   GNU General Public License for more details.                               *
#                                                                              *
#   You should have received a copy of the GNU General Public License          *
#   along with ReadOnMac. If not, see <http://www.gnu.org/licenses/>.          *
#                                                                              *
#*******************************************************************************

from Foundation import *
from AppKit import *
import objc

class ReaderView(WebView):
    rPath = NSBundle.mainBundle().resourcePath().fileSystemRepresentation()
    controller = objc.IBOutlet()
    
    def draggingEntered_(self, sender):
        return NSDragOperationDelete

    def performDragOperation_(self, sender):
        return objc.YES

    @objc.IBAction
    def resetFontSize_(self, sender):
        """ reset font size """
        self.webView.setTextSizeMultiplier_(1.0)